import request from '@/utils/request'

// 获取所有城市列表

export const getCity = () => request.get('/area/city', {
  params: {
    level: 1
  }
})

export const getCity2 = () => request.get('/area/city', {
  params: {
    level: 2
  }
})

// 获取热门城市
export const hotCity = () => request.get('/area/hot')

// 根据城市名称查询该城市信息接口
export const searchCity = (name) => request.get('/area/info', {
  params: {
    name
  }
})

// 获取子级城市列表接口
export const sonCity = (id) => request.get('/area', {
  params: {
    id
  }
})
